import request from '../utils/http'

export const reqGetAddressList = () => request.get('/userAddress/findUserAddress')
// 新增/修改
export const reqAddOrUpdateAddress = (data) => {
  if (data.id) {
    return request.post('/userAddress/update', data, { isLoading: false })
  } else {
    return request.post('/userAddress/save', data, { isLoading: false })
  }
}
// 详情
export const reqAddressDetail = (id) => request.get('/userAddress/' + id)
// 删除
export const reqDelAddress = (id) => request.get('/userAddress/delete/' + id)
